home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / clip.arc / CLIP.DOC < prev    next >
Encoding:
Text File  |  1987-05-20  |  9.5 KB  |  228 lines

  1.                     DOCUMENTATION FOR THE PROGRAM CLIP.COM
  2.  
  3. If you were to execute CLIP at the DOS prompt without giving it any parameters
  4. this is what you would see:
  5.  
  6.  
  7. CLIP Copyright (C) 1987 by Charles Lazo III, v1.23
  8.  
  9. CLIP syntax:  CLIP [d:][path]filename.ext
  10.  
  11. CLIP removes all terminal ^Z's, RETURN's and LINEFEEDS's from the file.
  12.  
  13.         CLIP.COM is shareware with a cost of $2 to satisfied users.
  14.  
  15. You may send payment, suggestions for improvement, complaints, bug reports, et
  16. cetera to:
  17.                 Charles Lazo III
  18.                 P.O. Box 2312
  19.                 Hohenwald, TN 38462.
  20.  
  21.  
  22.  
  23.  
  24.  
  25. As can be seen valid parameters for the CLIP program are:
  26.  
  27.                            [d:][path]filename.ext
  28.  
  29. where [d:] means you can use an optional drive letter (floppy, hard disk, ram
  30. disk, etc.)  [path] means that you can specify any valid path name for the file
  31. represented here by filename.ext.
  32.  
  33. The object of CLIP is to remove any terminating ^Z's, RETURN's and LINEFEED's
  34. from the specified file.  These are characters with ASCII codes 26, 13, and 10
  35. respectively or in hexadecimal 1A, D, and A.  Writing this program was motivated
  36. by the BRIEF (tm) editor which places these characters at the end of a file
  37. without regard to the user's wishes.  Perhaps the only problem these additions
  38. may cause is the doubling of DOS prompts at the completion of batch files.
  39. However, CLIP may be customized with DEBUG to eliminate null's (ASCII 0) or any
  40. other desired character(s) from the end of files.
  41.  
  42. To do this place a copy of CLIP.COM in the same directory as a copy of DEBUG.COM
  43. and enter DEBUG CLIP.COM at the DOS prompt.  Then to see the table of ASCII
  44. values that CLIP will eliminate from the end of files enter this:
  45.  
  46.                             d 400 l 100
  47.  
  48. You should see your screen fill with a table that looks like this:
  49.  
  50. xxxx:0400  00 00 00 00 00 00 00 00-00 00 01 00 00 01 00 00   ................
  51. xxxx:0410  00 00 00 00 00 00 00 00-00 00 01 00 00 00 00 00   ................
  52. xxxx:0420  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  53. xxxx:0430  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  54. xxxx:0440  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  55. xxxx:0450  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  56. xxxx:0460  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  57. xxxx:0470  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  58. xxxx:0480  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  59. xxxx:0490  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  60. xxxx:04A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  61. xxxx:04B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  62. xxxx:04C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  63. xxxx:04D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  64. xxxx:04E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  65. xxxx:04F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
  66.  
  67. Every character that is eliminated from the end of a file by CLIP will have a
  68. non zero value in the table (in this example the positions 40A, 40D, and 41A
  69. are occupied by 01 and this is the default setup for CLIP that eliminates
  70. LINEFEEDS, RETURNS's, and ^Z from the ends of files).  Every character that is
  71. not eliminated from the end of files by CLIP will have its corresponding
  72. location in the table occupied by 00.  The xxxx entries on the left of the
  73. table indicate a four digit hexadecimal number that will vary depending on your
  74. computer's setup.
  75.  
  76. To change the characters eliminated from the end of a file by CLIP you must
  77. modify this table in the CLIP.COM file to indicate the characters of your
  78. choice.  For example to patch CLIP.COM so that only null's will be eliminated
  79. from the ends of your files you should type in the following at DEBUG's "-"
  80. prompt:
  81.  
  82. -e40a
  83.  
  84. xxxx:040A  01.0
  85.  
  86. -e40d
  87.  
  88. xxxx:040D  01.0
  89.  
  90. -e41a
  91.  
  92. xxxx:041A  01.0
  93.  
  94. -e400
  95.  
  96. xxxx:0400  00.1
  97.  
  98. -w
  99.  
  100. -q
  101.  
  102. Note:  DEBUG's responses are the lines that begin with xxxx, except that you
  103. must type the 0 or 1 at the end of the line.  Provided you have a version of
  104. CLIP that contains the default setting as shown in the table above, these
  105. commands to DEBUG will write the file CLIP.COM to your disk that will remove
  106. only null's from the end of input files and you will be returned to the DOS
  107. prompt.
  108.  
  109. You need not make the non zero values in the table all 1's for indicating
  110. characters to be removed from files; any non zero value will do.
  111.  
  112. CLIP will not work on files that are larger than 65535 bytes (64K - 1).  Nor
  113. will it work if available memory is less than the file's size.
  114.  
  115. If you were to attempt to CLIP a file that had none of the excludable characters
  116. at its end, then CLIP would open the file, notice this condition, close the
  117. file, and exit without changing the file in any way (in particular date and
  118. time of creation of the file would be preserved).
  119.  
  120. CLIP exits with an extensive list of return codes that describe any error
  121. conditions that may apply.  The DOS related error codes and a paraphrase of the
  122. error messages returned by CLIP are:
  123.  
  124. 2 file not found.
  125. 3 path not found.
  126. 4 no handle available; all in use.
  127. 5 access denied.
  128. 8 insufficient memory.
  129.  
  130. Other possible (but highly improbable) DOS error codes can be returned.  They
  131. are documented in the DOS technical reference.  The ones above form a subset of
  132. this group.  If an error of this type ever does occur, then it will be reported
  133. as for example:
  134.  
  135. CLIP error:  unexpected error (code 0F).
  136.  
  137. If any error of this type is ever encountered by a user, then I would like to
  138. know; it will be accounted for in any update of CLIP.
  139.  
  140. CLIP also returns some error codes of its own these are:
  141.  
  142. 129 Not an error actually, but the code returned by CLIP when no parameters
  143.     are entered for CLIP and the message as shown at the beginning of this
  144.     documentation is displayed.
  145.  
  146. 130 The file is too large to CLIP, i.e., over 65535 bytes in length.
  147.  
  148. 131 If this error ever occurs CLIP will respond with:
  149.  
  150.     CLIP error:  file not written:  disk full?
  151.  
  152.     This error is highly unlikely since by my own test on a full floppy disk
  153.     the file that CLIP wrote occupied the same disk region as the original file.
  154.  
  155. If no error is detected and CLIP carries out the operation successfully, then
  156. the error code returned will be 0 and CLIP will finish after displaying the
  157. copyright message.
  158.  
  159. As the owner of the copyright of this software it is my wish that CLIP may be
  160. freely copied and distributed, subject to the provision that this document file
  161. CLIP.DOC accompany the CLIP.COM program.  Although not a provision of the
  162. copyright, it would probably be best if the CLIP.COM file were distributed in
  163. its original form, so that it acts in accordance with the message displayed
  164. when CLIP is entered without any parameters.
  165.  
  166. Although I am interested in the comments of anyone concerning this program,
  167. the comments that will receive the greatest consideration will be those given
  168. by users who send me the $2 payment for use of it.
  169.  
  170. The program may be enhanced in a number of ways.  Some which I have thought of
  171. are:
  172.  
  173. use with files over 65535 bytes in length
  174. use with files larger than available memory
  175. use of the wild card characters * and ? in file name specification
  176. allowing the specification of excludable characters on the command line
  177.  
  178. If you wish to vote for any of these features or others, then your vote will
  179. be tallied if you send in the $2 payment.  I will attempt to implement the most
  180. favored feature(s) in any future release.
  181.  
  182.                                   DISCLAIMER
  183.  
  184. This software CLIP.COM and the accompanying documentation CLIP.DOC are not
  185. warranted for any purpose either expressed or implied including but not
  186. limited to merchantability or fitness of purpose.  By using the software you
  187. agree to this.
  188.  
  189. If you wish to contact me you may do so by writing to the address at the top
  190. of this document or by using my CompuServe (tm) user ID 72210,17.
  191.  
  192. Ma Bell knows me as 615/796-2640.
  193.  
  194. bye
  195.  
  196.  
  197.  
  198.          ----------------end-of-author's-documentation---------------
  199.  
  200.                         Software Library Information:
  201.  
  202.                    This disk copy provided as a service of
  203.  
  204.                         The Public (Software) Library
  205.  
  206.                   Disks in the library are updated monthly.
  207.          For a copy of the latest monthly software library newsletter
  208.           and a list of the 800+ disks in the library, call or write
  209.  
  210.                         The Public (Software) Library
  211.                                P.O.Box 35705 K
  212.                            Houston, TX 77235-5705
  213.                                (713) 721-6104
  214.  
  215.          We are not the authors of this program, nor are we associated
  216.          with the author in any way other than as a distributor of the
  217.          program in accordance with the author's terms of distribution.
  218.  
  219.          Please direct shareware payments and specific questions about
  220.          this program to the author of the program, whose name appears
  221.          elsewhere in  this documentation. If you have trouble getting
  222.          in touch with the author,  we will do whatever we can to help
  223.          you with your questions. All programs have been tested and do
  224.          run.  To report problems,  please use the form that is in the
  225.          file PROBLEM.DOC on many of our disks or in other written for-
  226.          mat with screen printouts, if possible.
  227.  
  228.